@import "content";
@import "variables";

.field, .field-body {
    position: relative;
}

.region-center {
    max-width: $block-width;
    margin: 0 auto;

    &.content-center {
        margin-top: 2.5rem;

        textarea {
            height: 218px;
        }
        .block.image-block {
            height: 218px;

            .block-body {
                height: 100%;

                img {
                    height: 100%;
                    object-fit: cover;
                }
            }
        }
    }
}

.color-field {
    .input-group-prepend {
        width: 35px;
        position: relative;
    }

    .color-preview {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: solid 1px $gray-400;
        border-right: 0;
        border-top-left-radius: $border-radius;
        border-bottom-left-radius: $border-radius;
    }

    input[type="color"] {
        position: absolute;
        opacity: 0;
    }
}

.html-field {
    @include content();

    background: $white;
    border: solid 1px $gray-400;
    border-radius: $border-radius;
    padding: .75rem;

    &.empty:not(:focus-within)
    {
        background: $white url("../img/empty-text.png") no-repeat 50% 50%;
        height: 8rem;
    }
}

.field-description {
    margin: -.5rem 0 .5rem;
}

.media-field {
    .media-picker {
        .card {
            border: none;

            .card-body {
                background: #fff;
                padding: .4rem 1rem;
                margin-right: 1rem;
                border: solid 1px $gray-400;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                
                span {
                    display: block;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }
        }
    }
}
